package main

import "fmt"

//  有符号   取值范围  									无符号  		取值范围     				字节
//  int8    -128 ~ 127									uint8		0 ~ 255						8
//  int16   -32768 ~ 32767								uint16		0 ~ 65535					16
//  int32   -2147483648 ~ 2147483647					uint32  	0 ~ 4294967295				32
//  int64   -9223372036854775808 ~ 9223372036854775807	uint64		0 ~ 18446744073709551615	64
//  int   												uint									根据平台
func main() {
	var i8 int8 = 127
	var ui8 uint8 = 127
	fmt.Printf("int8: %d   uint8: %d \n", i8, ui8)

	var i16 int16 = 32767
	var ui16 uint16 = 65535
	fmt.Printf("int16: %d   uint16: %d \n", i16, ui16)

	var i32 int32 = 2147483647
	var ui32 uint32 = 4294967295
	fmt.Printf("int32: %d   uint32: %d \n", i32, ui32)

	var i64 int64 = 9223372036854775807
	var ui64 uint64 = ^uint64(0)
	fmt.Printf("int64: %d   uint64: %d \n", i64, ui64)

}
